<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rational Type Performance</title>
<link rel="stylesheet" href="../../multiprecision.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Multiprecision">
<link rel="up" href="../perf.html" title="Performance Comparison">
<link rel="prev" href="integer_performance.html" title="Integer Algorithm Performance">
<link rel="next" href="../map.html" title="Roadmap">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="integer_performance.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../map.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_multiprecision.perf.rational_performance"></a><a class="link" href="rational_performance.html" title="Rational Type Performance">Rational
      Type Performance</a>
</h3></div></div></div>
<p>
        Note that these tests are carefully designed to test performance of the underlying
        algorithms and not memory allocation or variable copying. As usual, performance
        results should be taken with a healthy dose of scepticism, and real-world
        performance may vary widely depending upon the specifics of the program.
        In each table relative times are given first, with the best performer given
        a score of 1. Total actual times are given in brackets, measured in seconds
        for 500000 operations.
      </p>
<div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator"></a><p class="title"><b>Table 1.72. Operator *</b></p>
<div class="table-contents"><table class="table" summary="Operator *">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  2.59318 (1.11835s)
                </p>
              </td>
<td>
                <p>
                  3.74332 (6.61855s)
                </p>
              </td>
<td>
                <p>
                  4.71871 (18.5981s)
                </p>
              </td>
<td>
                <p>
                  5.48511 (47.0022s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.431264s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (1.7681s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (3.94136s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (8.56905s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_int"></a><p class="title"><b>Table 1.73. Operator *(int)</b></p>
<div class="table-contents"><table class="table" summary="Operator *(int)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  5.63431 (0.612884s)
                </p>
              </td>
<td>
                <p>
                  25.5205 (2.83784s)
                </p>
              </td>
<td>
                <p>
                  64.6798 (7.61151s)
                </p>
              </td>
<td>
                <p>
                  135.335 (19.4821s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.108777s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.111198s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.11768s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.143955s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long"></a><p class="title"><b>Table 1.74. Operator *(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator *(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  4.44786 (0.691659s)
                </p>
              </td>
<td>
                <p>
                  18.4155 (2.97414s)
                </p>
              </td>
<td>
                <p>
                  44.4009 (7.64879s)
                </p>
              </td>
<td>
                <p>
                  98.4603 (19.5719s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.155504s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.161502s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.172267s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.19878s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long0"></a><p class="title"><b>Table 1.75. Operator *=(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator *=(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  4.12301 (0.690473s)
                </p>
              </td>
<td>
                <p>
                  20.2597 (3.35519s)
                </p>
              </td>
<td>
                <p>
                  42.8043 (7.47312s)
                </p>
              </td>
<td>
                <p>
                  94.2742 (19.3092s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.167468s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.165609s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.174588s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.20482s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator0"></a><p class="title"><b>Table 1.76. Operator +</b></p>
<div class="table-contents"><table class="table" summary="Operator +">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  8.51825 (1.97719s)
                </p>
              </td>
<td>
                <p>
                  7.8609 (7.34254s)
                </p>
              </td>
<td>
                <p>
                  9.73008 (21.2507s)
                </p>
              </td>
<td>
                <p>
                  11.1497 (49.7843s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.232113s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.93406s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (2.18402s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (4.46507s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_int0"></a><p class="title"><b>Table 1.77. Operator +(int)</b></p>
<div class="table-contents"><table class="table" summary="Operator +(int)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  7.17647 (0.669913s)
                </p>
              </td>
<td>
                <p>
                  29.8489 (2.91217s)
                </p>
              </td>
<td>
                <p>
                  75.7668 (7.40631s)
                </p>
              </td>
<td>
                <p>
                  254.371 (29.7057s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0933486s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0975637s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0977514s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.116781s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long1"></a><p class="title"><b>Table 1.78. Operator +(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator +(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  12.4996 (1.16835s)
                </p>
              </td>
<td>
                <p>
                  33.6691 (3.37438s)
                </p>
              </td>
<td>
                <p>
                  82.0167 (8.08959s)
                </p>
              </td>
<td>
                <p>
                  171.692 (19.9733s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0934708s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.100222s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0986335s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.116332s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long2"></a><p class="title"><b>Table 1.79. Operator +=(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator +=(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  11.7663 (1.14891s)
                </p>
              </td>
<td>
                <p>
                  34.4202 (3.45541s)
                </p>
              </td>
<td>
                <p>
                  78.1856 (8.17612s)
                </p>
              </td>
<td>
                <p>
                  161.351 (20.0733s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0976436s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.100389s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.104573s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.124408s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator1"></a><p class="title"><b>Table 1.80. Operator -</b></p>
<div class="table-contents"><table class="table" summary="Operator -">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  8.56942 (2.0234s)
                </p>
              </td>
<td>
                <p>
                  7.88071 (7.38282s)
                </p>
              </td>
<td>
                <p>
                  9.54207 (19.913s)
                </p>
              </td>
<td>
                <p>
                  11.4343 (50.8786s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.236118s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.936822s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (2.08686s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (4.44964s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_int1"></a><p class="title"><b>Table 1.81. Operator -(int)</b></p>
<div class="table-contents"><table class="table" summary="Operator -(int)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  6.62286 (0.62794s)
                </p>
              </td>
<td>
                <p>
                  30.6629 (2.96506s)
                </p>
              </td>
<td>
                <p>
                  75.926 (7.56072s)
                </p>
              </td>
<td>
                <p>
                  199.475 (23.42s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.094814s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0966986s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0995801s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.117408s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long3"></a><p class="title"><b>Table 1.82. Operator -(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator -(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  12.3835 (1.16081s)
                </p>
              </td>
<td>
                <p>
                  36.0761 (3.40187s)
                </p>
              </td>
<td>
                <p>
                  83.3673 (8.26011s)
                </p>
              </td>
<td>
                <p>
                  169.239 (20.5682s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0937381s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.094297s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.099081s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.121534s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long4"></a><p class="title"><b>Table 1.83. Operator -=(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator -=(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  11.6833 (1.16049s)
                </p>
              </td>
<td>
                <p>
                  36.6427 (3.64132s)
                </p>
              </td>
<td>
                <p>
                  77.0952 (8.10257s)
                </p>
              </td>
<td>
                <p>
                  160.444 (20.0829s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0993285s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0993737s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.105098s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.12517s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator2"></a><p class="title"><b>Table 1.84. Operator /</b></p>
<div class="table-contents"><table class="table" summary="Operator /">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  5.67626 (6.66075s)
                </p>
              </td>
<td>
                <p>
                  5.99288 (21.0634s)
                </p>
              </td>
<td>
                <p>
                  8.08809 (55.0195s)
                </p>
              </td>
<td>
                <p>
                  10.5818 (149.774s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (1.17344s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (3.51474s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (6.80254s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (14.1539s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_int2"></a><p class="title"><b>Table 1.85. Operator /(int)</b></p>
<div class="table-contents"><table class="table" summary="Operator /(int)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  5.9046 (0.64166s)
                </p>
              </td>
<td>
                <p>
                  25.5252 (2.84312s)
                </p>
              </td>
<td>
                <p>
                  65.4027 (7.74325s)
                </p>
              </td>
<td>
                <p>
                  134.42 (19.5619s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.108671s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.111385s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.118393s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.145528s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long5"></a><p class="title"><b>Table 1.86. Operator /(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator /(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  4.35172 (0.691696s)
                </p>
              </td>
<td>
                <p>
                  18.2795 (2.94678s)
                </p>
              </td>
<td>
                <p>
                  44.2487 (7.48547s)
                </p>
              </td>
<td>
                <p>
                  99.1392 (19.5526s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.158948s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.161207s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.169168s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.197224s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_unsigned_long_long6"></a><p class="title"><b>Table 1.87. Operator /=(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator /=(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  4.14511 (0.685733s)
                </p>
              </td>
<td>
                <p>
                  18.3237 (3.08065s)
                </p>
              </td>
<td>
                <p>
                  43.3784 (7.43555s)
                </p>
              </td>
<td>
                <p>
                  94.2547 (19.2754s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.165432s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.168124s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.171411s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.204503s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_construct"></a><p class="title"><b>Table 1.88. Operator construct</b></p>
<div class="table-contents"><table class="table" summary="Operator construct">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00323537s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00328614s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.0032946s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00333283s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  28.9199 (0.0935664s)
                </p>
              </td>
<td>
                <p>
                  28.1463 (0.0924926s)
                </p>
              </td>
<td>
                <p>
                  28.2564 (0.0930936s)
                </p>
              </td>
<td>
                <p>
                  27.5848 (0.0919355s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_construct_unsigned_long"></a><p class="title"><b>Table 1.89. Operator construct(unsigned long long)</b></p>
<div class="table-contents"><table class="table" summary="Operator construct(unsigned long long)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00333944s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00335336s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00348777s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00345967s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  29.1785 (0.09744s)
                </p>
              </td>
<td>
                <p>
                  29.1475 (0.097742s)
                </p>
              </td>
<td>
                <p>
                  27.4732 (0.0958203s)
                </p>
              </td>
<td>
                <p>
                  28.6655 (0.099173s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_construct_unsigned"></a><p class="title"><b>Table 1.90. Operator construct(unsigned)</b></p>
<div class="table-contents"><table class="table" summary="Operator construct(unsigned)">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00321917s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00319471s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00327131s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00366486s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  30.8553 (0.0993283s)
                </p>
              </td>
<td>
                <p>
                  30.5973 (0.0977495s)
                </p>
              </td>
<td>
                <p>
                  29.5866 (0.0967869s)
                </p>
              </td>
<td>
                <p>
                  28.3432 (0.103874s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.operator_str"></a><p class="title"><b>Table 1.91. Operator str</b></p>
<div class="table-contents"><table class="table" summary="Operator str">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Backend
                </p>
              </th>
<th>
                <p>
                  128 Bits
                </p>
              </th>
<th>
                <p>
                  256 Bits
                </p>
              </th>
<th>
                <p>
                  512 Bits
                </p>
              </th>
<th>
                <p>
                  1024 Bits
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  cpp_rational
                </p>
              </td>
<td>
                <p>
                  5.80834 (0.00206821s)
                </p>
              </td>
<td>
                <p>
                  11.5273 (0.00645497s)
                </p>
              </td>
<td>
                <p>
                  18.1686 (0.0156602s)
                </p>
              </td>
<td>
                <p>
                  38.1095 (0.0705044s)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mpq_rational
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.000356077s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.000559971s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.000861937s)
                </p>
              </td>
<td>
                <p>
                  <span class="bold"><strong>1</strong></span> (0.00185005s)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_performance.platform"></a><p class="title"><b>Table 1.92. Platform Details</b></p>
<div class="table-contents"><table class="table" summary="Platform Details">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Platform
                </p>
              </th>
<th>
                <p>
                  Linux 5.3.0-24-generic, version #26-Ubuntu SMP Thu Nov 14 01:33:18
                  UTC 2019, x86_64
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  Compiler
                </p>
              </td>
<td>
                <p>
                  GNU C++ version 9.2.1 20191008
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  GMP
                </p>
              </td>
<td>
                <p>
                  6.1.2
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  MPFR
                </p>
              </td>
<td>
                <p>
                  262146
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  Boost
                </p>
              </td>
<td>
                <p>
                  107200
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run date
                </p>
              </td>
<td>
                <p>
                  Dec 13 2019
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2002-2020 John
      Maddock and Christopher Kormanyos<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="integer_performance.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../map.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
